package com.ce.pms.charge.vo;

import java.util.Date;

import com.ce.pms.common.model.SysrefcodeDO;
import com.sitechasia.webx.core.model.IViewObject;

/**
 * 抽象交易VO
 * @author yandawei
 *
 */
public abstract class AbstractTransVO implements IViewObject {
	/**
	 * 账户所属房屋id
	 */
	protected Long accountHouseId;

	/**
	 * 帐户id
	 */
	protected Long accountId;

	/**
	 * 交易码
	 */
	protected String bizCode;

	/**
	 * 交易码id
	 */
	protected Long businessId;

	/**
	 * 交易类型
	 * 收费账户
	 *	收费类交易: 001本金交易;002减免交易;003调整交易;004滞纳金交易;
	 *  支付类交易: 005支付主交易;006支付子交易(多重支付);
	 *
	 *  预交款账户
	 *  007收款交易;008抵冲交易
	 */
	protected String clazz;

	/**
	 * 创建人id
	 */
	protected Long creator;

	/**
	 * 交易描述
	 */
	protected String description;

	/**
	 * 来源产权房屋id
	 */
	protected Long houseId;

	/**
	 * 修改人id
	 */
	protected Long modifier;

	/**
	 * 修改日期
	 */
	protected Date modifyDate;

	/**
	 * 收费周期 如：200801
	 */
	protected String period;

	/**
	 * 收费周期id
	 */
	protected Long periodId;

	/**
	 * 备注
	 */
	protected String remark;

	/**
	 * 子帐户id
	 */
	protected Long subAccountId;

	/**
	 * 创建日期
	 */
	protected Date sysDate;

	/**
	 * 交易id
	 */
	protected Long transactionId;

	/**
	 * 交易名称
	 */
	protected String transName;

	public AbstractTransVO() {
		super();
	}

	/**
	 * 新增一个交易(实收)的构造器
	 * @param accountHouseId 账户所属房屋ID
	 * @param businessId 交易码ID
	 * @param creator 创建人ID
	 */
	protected AbstractTransVO(Long accountHouseId, Long businessId, Long creator) {
		super();
		this.accountHouseId = accountHouseId;
		this.businessId = businessId;
		this.creator = creator;
	}

	/**
	 * 新增一个交易(应收)的构造器
	 * @param accountHouseId 账户所属房屋ID
	 * @param businessId 交易码ID
	 * @param houseId 来源产权房ID
	 * @param creator 创建人ID
	 */
	protected AbstractTransVO(Long accountHouseId, Long businessId, Long houseId, Long creator) {
		super();
		this.accountHouseId = accountHouseId;
		this.businessId = businessId;
		this.houseId = houseId;
		this.creator = creator;
	}

	/**
	 * 功能描述: 得到账户所属房屋id  <br>
	 */
	public Long getAccountHouseId() {
		return accountHouseId;
	}

	public Long getAccountId() {
		return accountId;
	}

	/**
	 * @return 交易码
	 */
	public String getBizCode() {
		return bizCode;
	}

	public Long getBusinessId() {
		return businessId;
	}

	/**
	 * @return 交易类型
	 */
	public String getClazz() {
		return clazz;
	}

	/**
	 * @return the creator
	 */
	public Long getCreator() {
		return creator;
	}

	/**
	 * @return the 交易描述
	 */
	public String getDescription() {
		return description;
	}

	public Long getHouseId() {
		return houseId;
	}

	/**
	 * @return the modifier
	 */
	public Long getModifier() {
		return modifier;
	}

	/**
	 * @return the modifyDate
	 */
	public Date getModifyDate() {
		return modifyDate;
	}

	/**
	 * @return the period
	 */
	public String getPeriod() {
		return period;
	}

	public Long getPeriodId() {
		return periodId;
	}

	public String getRemark() {
		return remark;
	}

	/**
	 * @return the subAccountId
	 */
	public Long getSubAccountId() {
		return subAccountId;
	}

	/**
	 * @return the sysDate
	 */
	public Date getSysDate() {
		return sysDate;
	}

	public Long getTransactionId() {
		return transactionId;
	}

	public String getTransName() {
		return transName;
	}

	/**
	 * 功能描述: 判断交易类型是否为应收交易 <br>
	 * @return　true 是应收交易　false 不是应收交易
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2008-8-29  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public Boolean isDebitTransaction(){
		return SysrefcodeDO.FEE_TRANSACTION_CLAZZ_PRINCIPAL.equals(this.clazz)
				|| SysrefcodeDO.FEE_TRANSACTION_CLAZZ_RELIEF.equals(this.clazz)
				|| SysrefcodeDO.FEE_TRANSACTION_CLAZZ_ADJUSTMENT.equals(this.clazz)
				|| SysrefcodeDO.FEE_TRANSACTION_CLAZZ_LATEFEES.equals(this.clazz);
	}

	public void setAccountHouseId(Long accountHouseId) {
		this.accountHouseId = accountHouseId;
	}

	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}

	/**
	 * @param 交易码 to set
	 */
	public void setBizCode(String bizCode) {
		this.bizCode = bizCode;
	}

	public void setBusinessId(Long businessId) {
		this.businessId = businessId;
	}

	/**
	 * @param 交易类型 set
	 */
	public void setClazz(String clazz) {
		this.clazz = clazz;
	}

	/**
	 * @param creator the creator to set
	 */
	public void setCreator(Long creator) {
		this.creator = creator;
	}

	/**
	 * @param 交易描述 to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * 功能描述: 设置账户所属房屋id  <br>
	 * @param houseId
	 */
	public void setHouseId(Long houseId) {
		this.houseId = houseId;
	}

	/**
	 * @param modifier the modifier to set
	 */
	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	/**
	 * @param modifyDate the modifyDate to set
	 */
	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}

	/**
	 * @param period the period to set
	 */
	public void setPeriod(String period) {
		this.period = period;
	}

	public void setPeriodId(Long periodId) {
		this.periodId = periodId;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * @param subAccountId the subAccountId to set
	 */
	public void setSubAccountId(Long subAccountId) {
		this.subAccountId = subAccountId;
	}

	/**
	 * @param sysDate the sysDate to set
	 */
	public void setSysDate(Date sysDate) {
		this.sysDate = sysDate;
	}

	public void setTransactionId(Long transactionId) {
		this.transactionId = transactionId;
	}

	public void setTransName(String transName) {
		this.transName = transName;
	}
}
